<?php /*a:7:{s:60:"E:\code\jiaoyou\application\admin\view\bonus\bonus_list.html";i:1599553348;s:57:"E:\code\jiaoyou\application\admin\view\public\header.html";i:1598939754;s:54:"E:\code\jiaoyou\application\admin\view\public\css.html";i:1598939754;s:53:"E:\code\jiaoyou\application\admin\view\public\js.html";i:1598939754;s:58:"E:\code\jiaoyou\application\admin\view\public\tophead.html";i:1598939754;s:54:"E:\code\jiaoyou\application\admin\view\public\top.html";i:1598939753;s:57:"E:\code\jiaoyou\application\admin\view\public\footer.html";i:1598939753;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<title>后台系统</title>
<!--[if lt IE 9]>
<meta http-equiv="refresh" content="0;ie.html" />
<![endif]-->
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/animate.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/style.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/ffxiang.css" />
<link rel="shortcut icon" href="http://jiaoyou.com\/style/admin/img/favicon.ico">
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/layui/layui.js"></script>
    <link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/layui/css/layui.css" />
</head>
<style type="text/css">
    #des, #des input {
        width: 40px;
        text-align: center;
    }

    #id {
        width: 78px;
    }

    .bs-checkbox {
        width: 36px;
        height: 40px
    }

    .fixed-table-toolbar .columns, .fixed-table-toolbar .search {
        margin-left: 0px;
        margin-top: 0px
    }

    #title span {
        float: right;
    }

    .btn-active {
        background: #1ab394;
        color: #fff
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="ibox float-e-margins">
        <?php 
$controller=strtolower(request()->controller());
$action=strtolower(request()->action());
$adminCtegory=db('category')->where(['controller'=>$controller,'function'=>$action])->cache(_cache('db'))->find();
$admin = Session::get('admin', 'mmjtAdmin');

if ($admin['id'] != 1 && $admin['type'] != 1) {
  $auth_visit = Db::name('admin_type')->where(['id' => $admin['type']])->value('data');
  $auth_visit = json_decode($auth_visit, true);
}else{
  $auth_visit = Db::name('category')->column('id');
}
if($adminCtegory){
	$adminCtegoryTid=db('category')->where(['tid'=>$adminCtegory['id'],'hideright'=>1])->order('des asc,id asc')->cache(_cache('db'))->select();
}else{
  $adminCtegoryTid=[];
}
 ?>
<div class="">
	<?php if(is_array($adminCtegoryTid) || $adminCtegoryTid instanceof \think\Collection || $adminCtegoryTid instanceof \think\Paginator): $i = 0; $__LIST__ = $adminCtegoryTid;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;
  $get=$v['get'];
  $geturl=[]; 
  if($get){
    if(strstr($get,"|")){
      $tidexplode=explode("|",$get);
      foreach($tidexplode as $va){
        $geturl[$va]=input($va);
      }
    }else{
        $geturl[$get]=input($get);
    }
  }
  $geturl['url']='-1';
  $url=url($v['controller'].'/'.$v['function'],$geturl);
   if(in_array($v['id'],$auth_visit)): ?><a onclick="add('<?php echo htmlentities($url); ?>')" href="javascript:void(0);" class="btn btn-primary "><?php echo htmlentities($v['title']); ?></a><?php endif; ?>
  <?php endforeach; endif; else: echo "" ;endif; ?>
</div>
<script type="text/javascript">
function add(url){
        layer.open({
          type: 2,
          title: '提示',
          shadeClose: false,
          shade: 0.2,
          area: ['90%', '90%'],
          skin:'shangchuantup',
          shift:-1,
          content: url,
          scrollbar: false,
          moveType: 1,
          moveOut: true
        }); 
}
</script>
        <div class="ibox-title">
<h5>
<?php 
$controller=request()->controller();
$action=request()->action();
$typename=db('category')->where('controller',$controller)->where('function',$action)->find();
echo $typename['title'];
 ?></h5>
</div>
        <div class="ibox-content">
            <div class="row row-lg">

                <div style="display:block;clear: both;"></div>
                <div class="fixed-table-toolbar">
                    <form method="get" action="">
                        <div class="pull-left search">

                            <div class="columns columns-right btn-group pull-left">
                                <select class="form-control" name="search_field">
                                    <option value="b.money" <?php if(input('get.search_field') == 'b.money'): ?>selected="selected"<?php endif; ?>>总奖金</option>
                                    <option value="b.netincome" <?php if(input('get.search_field') == 'b.netincomee'): ?>selected="selected"<?php endif; ?>>总净奖金</option>
                                    <option value="b.recommend_money" <?php if(input('get.search_field') == 'b.recommend_money'): ?>selected="selected"<?php endif; ?>>推荐奖</option>
                                    <option value="b.commission_money" <?php if(input('get.search_field') == 'b.commission_money'): ?>selected="selected"<?php endif; ?>>佣金奖</option>

                                </select>
                            </div>

                            <div class="columns columns-right btn-group pull-left">
                                <select class="form-control" name="search_op">
                                    <option value="gt" >大于</option>
                                    <option value="eq" >等于</option>
                                    <option value="lt" >小于</option>
                                </select>
                            </div>

                            <div class="columns columns-right btn-group pull-left">
                                <input class="form-control input-outline" placeholder="金额" type="search_value" name="search_value" value="<?php echo input('get.search_value', ''); ?>" />
                            </div>

                            <div class="columns columns-right btn-group pull-left">
                                <select class="form-control" name="field">
                                    <option value="m.id"  <?php if(input('get.field') == 'm.id'): ?>selected="selected"<?php endif; ?> >用户id</option>
                                    <option value="m.username"  <?php if(input('get.field') == 'm.username'): ?>selected="selected"<?php endif; ?> >手机号</option>
                                    <option value="m.nickname"  <?php if(input('get.field') == 'm.nickname'): ?>selected="selected"<?php endif; ?>>昵称</option>
                                    <option value="b.periods" <?php if(input('get.field') == 'b.periods'): ?>selected="selected"<?php endif; ?>>期数</option>
                                </select>
                            </div>
                            <div class="columns columns-right btn-group pull-left">
                                <input class="form-control input-outline" placeholder="" type="text" name="value" value="<?php echo input('get.value', ''); ?>" />
                            </div>

                            <div class="pull-right search">
                                <button style="border-radius:0px; border:1px solid #e5e6e7; border-left:0px"
                                        class="btn btn-default btn-outline" type="submit">搜索
                                </button>
                                <?php if(input('?get.back')): ?>
                                <input  type="hidden" name="back" value="-1"/>
                                <a class="btn btn-w-m btn-link" href="<?php echo url('bonus/source'); ?>">返回</a>
                                <?php endif; ?>
                            </div>


                            <div class="columns columns-right btn-group pull-right">
                                <input type="text" name="date_range" id="date_range" class="form-control" placeholder="结算时间"
                                       value="<?php if(!empty($name['begin_date'])): ?><?php echo htmlentities($name['begin_date']); ?><?php endif; if(!empty($name['end_date'])): ?> - <?php echo htmlentities($name['end_date']); ?><?php endif; ?>" />
                            </div>

                        </div>
                    </form>

                </div>
                <div class="example">
                    <form class="form-horizontal" method="post">
                        <table data-toggle="table">
                            <thead>
                            <tr>

                                <th data-align="center">期数</th>
                                <th data-align="center">会员id</th>
                                <th data-align="center">会员昵称</th>
                                <th data-align="center">手机号</th>
                                <th data-align="center">总奖金收入</th>
                                <th data-align="center">总净奖金收入</th>
                                <th data-align="center">推荐奖</th>
                                <th data-align="center">佣金奖</th>
                                <th data-align="center">合伙人奖</th>
                                <th data-align="center">是否发放</th>
                                <th data-align="center">发放方式</th>
                                <!--<th data-align="center">状态</th>-->
                                <th data-align="center">奖金结算时间</th>
                                <th data-align="center">奖金发放时间</th>
                                <th data-align="center">来源</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                            <tr id="id<?php echo htmlentities($vo['id']); ?>">
                                <td><?php echo htmlentities($vo['periods']); ?></td>
                                <td><?php echo htmlentities($vo['member_id']); ?></td>
                                <td><?php echo htmlentities($vo['nickname']); ?></td>
                                <td><?php echo htmlentities($vo['username']); ?></td>
                                <td><?php echo htmlentities($vo['money']); ?></td>
                                <td><?php echo htmlentities($vo['netincome']); ?></td>
                                <td><?php echo htmlentities($vo['recommend_money']); ?></td>
                                <td><?php echo htmlentities($vo['commission_money']); ?></td>
                                <td><?php echo htmlentities($vo['partner_money']); ?></td>
                                <td><?php if($vo['done']): ?>已发<?php else: ?>未发<?php endif; ?></td>
                             <td><?php echo htmlentities($grant_types[$vo['grant_type']]); ?></td>
                                <!--<td><?php if($vo['state']==0): ?>正常<?php else: ?>停发<?php endif; ?></td>-->
                                <td><?php if($vo['create_time']): ?><?php echo htmlentities(date('Y-m-d H:i:s',!is_numeric($vo['create_time'])? strtotime($vo['create_time']) : $vo['create_time'])); ?><?php endif; ?></td>
                                <td><?php if($vo['grant_time']): ?><?php echo htmlentities(date('Y-m-d H:i:s',!is_numeric($vo['grant_time'])? strtotime($vo['grant_time']) : $vo['grant_time'])); ?><?php endif; ?></td>
                                <td>
                                    <span class="btn btn-xs btn-primary" onclick="layer.alert('<?php echo htmlentities($vo['source']); ?>',{title:'奖金来源'})">来源</span>
                                </td>
                            </tr>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                            </tbody>
                        </table>
                    </form>
                </div>
            </div>

            <hr>
            <div class="row row-lg">
                <div class="col-sm-12 pages"><?php echo $page; ?></div>
            </div>
        </div>
    </div>
</div>

     
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/content.min.js"></script>
    <link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/plugins/sweetalert/sweetalert.css" />
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/layer/layer.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/ffxiangIndex.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/common.js"></script>
</body>
</html>
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/plugins/bootstrap/bootstrap-table.min.css" />
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/bootstrap/bootstrap-table.min.js"></script>
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/bootstrap/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript">
    function openSource(content) {
        layer.alert('Hi，你好！ 点击确认更换图标', {
            icon: icon,
            shadeClose: true,
            title: icon === -1 ? '初体验 - layer '+layer.v : 'icon：'+icon + ' - layer '+layer.v
        }, changeIcon);
    }
    //年月范围
    layui.use('laydate',function () {
        layui.laydate.render({
            elem: '#date_range',
            type: 'date',
            range: true
        });
    });
</script>